package cn.edu.scau.cmi.xuandingcong.adapter;

import java.util.List;

public class SortUtil2 implements sortUtilInterface{

	private sortInt s;
	public SortUtil2(sortInt s){
		this.s = s;
	}
	
	public int[] SortInt(int[] a) {
		return this.s.SortInt(a);
	}
	
	@Override
	public List<Integer> sortUtil(List<Integer> utilList) {
		
		
		for(int i=0; i<utilList.size() ; i++) {
			for(int j=i; j<utilList.size(); j++) {
				
				if(utilList.get(j) < utilList.get(i)) {
					Integer tmp  = utilList.get(j);
					utilList.set(j,utilList.get(j+1));
					utilList.set(j+1, tmp);
					
				}
			}
		}
		
		return utilList;
		
	}
	

}
